package com.xy.tianyu.module.picture.adapter

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xy.tianyu.R
import com.xy.tianyu.module.picture.bean.SearchDayItem
import com.xy.tianyu.utils.GlideUtils

/**
 * @time 2020/10/12 15:09
 * @class 描述:
 */
class PicHotSearchAdapter(layoutResId: Int, data:MutableList<SearchDayItem>):
    BaseQuickAdapter<SearchDayItem, BaseViewHolder>(layoutResId,data) {
    override fun convert(holder: BaseViewHolder, item: SearchDayItem) {
        val mIvPicHot = holder.getView<ImageView>(R.id.iv_pic_hot_search)

        Glide.with(context).load(item.pic_infos.url).apply(GlideUtils.getRoundRequestOptions()).into(mIvPicHot)
        holder.setText(R.id.tv_pic_hot_search_name,item.search_word)
    }
}